import { S } from '../../s';
import { IPSDEActionLogic } from './ipsdeaction-logic';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEActionLogicImpl
  extends PSModelObjectImpl
  implements IPSDEActionLogic
{
  get actionLogicType():
    | 1
    | 0
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 50
    | 51
    | 52
    | 53
    | 54
    | 55
    | 56 {
    return this.M.actionLogicType;
  }

  get attachMode(): 'PREPARE' | 'CHECK' | 'BEFORE' | 'AFTER' {
    return this.M.attachMode;
  }

  get dataSyncEvent(): 1 | 2 | 4 | 256 | 512 {
    return this.M.dataSyncEvent != null ? this.M.dataSyncEvent : 0;
  }

  get scriptCode(): string {
    return this.M.scriptCode;
  }

  get cloneParam(): boolean {
    return this.M.cloneParam != null ? this.M.cloneParam : false;
  }

  get enableBackend(): boolean {
    return this.M.enableBackend != null ? this.M.enableBackend : true;
  }

  get ignoreException(): boolean {
    return this.M.ignoreException != null ? this.M.ignoreException : false;
  }

  get internalLogic(): boolean {
    return this.M.internalLogic;
  }

  get valid(): boolean {
    return this.M.valid != null ? this.M.valid : true;
  }
  get cls(): string {
    return 'PSDEActionLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._1d2) return true;
    return super.instanceof(cls);
  }
}
